<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue.extend的使用</title>
</head>
<script src="vue.js"></script>
<body>
    <div id="app1">app1: {{title}}</div>
    <div id="app2">app2: {{title}}</div>
    <script>
        var Vue2 = Vue.extend({
            data(){
                return { title: 'hello'}
            }
        })
        var vm1 = new Vue({ el: '#app1'})
        var vm2 = new Vue({ el: '#app1'})
    </script>
</body>
</html>